package com.example.consumer.service;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * Created with IntelliJ IDEA 2023.
 * Description:
 * User: 故我
 * Date: 2024-01-13
 * Time: 18:34
 */
// 声明 openFerign 式的 Service
@Service
@FeignClient(name = "nacos-discovery-demo")    // 指明调用哪个生产者
public interface UserService {
    // 生产者的接口
    @RequestMapping("/user/getuserbyid")
    public String getUserById(@RequestParam("id") Integer id);
}
